package com.jyx.refactor.beginner.service.impl;

import com.jyx.refactor.beginner.Movie;
import com.jyx.refactor.beginner.service.Price;

public class ChildrenPrice extends Price {

	@Override
	public int getPriceCode() {
		return Movie.CHILDRENS;
	}

	@Override
	public double calcAmount(int daysRented) {
		double amount = 1.5;
		if(daysRented > 3)
			amount += (daysRented -3) * 1.5;
		return amount;
	}

}
